IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].UpdateMoveToRexSatusForProcess') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].UpdateMoveToRexSatusForProcess
GO

/***************************************************************************
* Name:			UpdateMoveToRexSatusForProcess
* Purpose:		Update a Status for the Process right after it moves to Rex. 
*
* PARAMETERS
* Name			Description					
* -------------		-----------------------------------------------------------
* @processId		id of the process
***************************************************************************/

CREATE PROCEDURE dbo.UpdateMoveToRexSatusForProcess
(
	@processId INT
)
AS
BEGIN
	
	SET NOCOUNT ON

	update ProtocolProcess
	set MovedToRex = 1
	where Id = @processId

END

GO

